<?php

namespace app\api\home;

class Js extends Base
{
    public function index()
    {
        if (request()->isAjax()) {
            $token = sha1(time());
            echo "var __token__='".$token."';";
            die;
        } else {
            $token = $this->request->token('__token__', 'sha1');
            echo "var __token__='".$token."';";
            die;
        }
    }
}
